# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=gupnp-dlna
pkgver=0.12.0
pkgrel=2
pkgdesc="Library to ease DLNA-related bits for applications using gupnp"
url="https://wiki.gnome.org/Projects/GUPnP"
arch=(x86_64)
license=(LGPL)
depends=(gst-plugins-base-libs)
makedepends=(gobject-introspection gtk-doc vala meson git)
options=(debug)
_commit=cc09daae47ef0e030895edbeba58636c76f53b3d  # tags/gupnp-dlna-0.12.0^0
source=("git+https://gitlab.gnome.org/GNOME/gupnp-dlna.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gupnp-dlna-//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  depends+=(libg{lib,object}-2.0.so)
  provides+=(libgupnp-dlna{,-gst}-2.0.so)

  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
